﻿#pragma once
#include "Dream/Renderer/RenderCommand.h"
#include "Dream/Renderer/Shader.h"
#include "Dream/Renderer/Camera/OrthographicCamera.h"

namespace Dream
{

	class DM_API Renderer
	{
	public:

        static void Init();
        static void Shutdown();

        static void OnWindowResize(uint32_t width, uint32_t height);

        static void BeginScene(OrthographicCamera& camera);
        static void EndScene();

        static void Submit(const Ref<Shader>& shader, const Ref<VertexArray>& vertexArray, const glm::mat4& transform = glm::mat4(1.0f));

        inline static RendererAPI::API GetAPI() { return RendererAPI::GetAPI(); }

    private:
        struct SceneData
        {
            glm::mat4 ViewProjectionMatrix;
        };

        static Scope<SceneData> s_SceneData;
	};


}
/*
    ┌────────────────────┐
    │  Application (App) │
    └─────────┬──────────┘
              │
              ▼
       ┌──────────────┐
       │   Renderer   │ ◀────────────┐
       └──────┬───────┘              │
              ▼                      │
   ┌────────────────────────────┐    │
   │ VertexBuffer / IndexBuffer │    │
   └────────────┬───────────────┘    │
                ▼                    │
            ┌────────┐               │
            │ Shader │               │
            └────────┘               │
                ▲                    │
                │                    │
     ┌─────────────────────┐         │
     │   GraphicsContext   │ ────────┘
     └─────────────────────┘

*/
